package com.jwj.service.impl;

import com.jwj.Dao.PostDao;
import com.jwj.pojo.Post;
import com.jwj.pojo.Post_category_account;
import com.jwj.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PostServiceImpl implements PostService {

    @Resource
    private PostDao postDao;
    @Override
    public List<Post_category_account> PostAll() {
        return postDao.PostAll();
    }

    @Override
    public Post OnePost(int post_id) {
        return postDao.OnePost(post_id);
    }

    @Override
    public List<Post_category_account> PostState(int state) {
        return postDao.PostState(state);
    }

    @Override
    public int UpdatePost(Post post) {
        return postDao.UpdatePost(post);
    }

    @Override
    public int AddPost(Post post) {
        return postDao.AddPost(post);
    }

    @Override
    public int DeletePost(int post_id) {
        return postDao.DeletePost(post_id);
    }


}
